package com.newer.dao.mapper.sys;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.newer.dao.bean.sys.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    Integer deleteByPrimaryKey(String id);

    @Override
    Integer insert(User record);

    Integer insertSelective(User record);

    User selectByPrimaryKey(String id);

    Integer updateByPrimaryKeySelective(User record);

    Integer updateByPrimaryKey(User record);

    User selectByLoginName(String loginName);

    List<User> selectByParams(Page<User> page, User user);

    User selectById(String userId);

    @Update("update s_auth_user set status = #{status} where id = #{userId}")
    Integer updateUserStatus(@Param("userId") String userId, @Param("status") Integer status);
}